// index.js
// 获取应用实例
const app = getApp()
const key = ''; //使用在腾讯位置服务申请的key
const referer = ''; //调用插件的app的名称
const location = JSON.stringify({
  latitude: 39.89631551,
  longitude: 116.323459711
})
const category = '生活服务,娱乐休闲';

  Page({
    data: {

    },

    onReady: function (e) {
      // 使用 wx.createMapContext 获取 map 上下文
      this.mapCtx = wx.createMapContext('myMap')
    },
    getCenterLocation: function () {
      this.mapCtx.getCenterLocation({
        success: function (res) {
          console.log(res.longitude)
          console.log(res.latitude)
        }
      })
    },
    moveToLocation: function () {
      this.mapCtx.moveToLocation()
    },
    translateMarker: function () {
    wx.navigateTo({
      url: '../logs/logs',
    })
    },
    translateMarker1: function () {
      wx.navigateTo({
        url: '../ceshi/ceshi',
      })
      },
    includePoints: function () {
      this.mapCtx.includePoints({
        padding: [10],
        points: [{
          latitude: 23.10229,
          longitude: 113.3345211,
        }, {
          latitude: 23.00229,
          longitude: 113.3345211,
        }]
      })
    },

  })